//
//  EMView.m
//  EMImageView
//
//  Created by EasonWang on 13-12-20.
//  Copyright (c) 2013年 EasonWang. All rights reserved.
//

#import "EMView.h"

@implementation EMView
@synthesize image = _image;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        [self drawRect:frame];
    }
    return self;
}

-(id)initWithFrame:(CGRect)frame image:(UIImage*)image
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        _image = image;
        [self drawRect:frame];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/
-(void)drawRect:(CGRect)rect
{
    [_image drawInRect:CGRectMake(0, 0, _image.size.width, _image.size.height)];
    NSLog(@"%@",_image);
}
@end
